package com.huawei.crm.mapper;

import com.huawei.crm.domain.Role;
import com.huawei.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role r);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role r);

    List<Role> selectForList(QueryObject qo);

    // 删除角色和权限的关系
    void deleteRoleAndPermissionRelation(Long roleId);

    // 插入角色和权限的关系
    void insertRoleAndPermissionRelation(@Param("roleId") Long roleId, @Param("permissionId") Long permissionId);

    List<String> selectSnByEmpId(Long id);
}